package com.grandpa;

import org.quartz.*;

import java.util.concurrent.*;

/**
 * @author tmf
 * @description:
 * @date 2024-11-20
 */
public class MyJob implements InterruptableJob  {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        System.out.println("Job executed");
        try {
            Thread.sleep(1000 * 10);
            System.out.println("Job end");
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }

    }

    @Override
    public void interrupt() throws UnableToInterruptJobException {
        System.out.println("interrupt");
    }
}
